package com.example.hosptial.repository;

import com.example.hosptial.model.enity.Department;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface DepartmentRepository extends JpaRepository<Department, Integer> {

    // 根据科室名称查询
    Department findByDeptName(String deptName);

    // 检查科室名称是否存在
    boolean existsByDeptName(String deptName);
}